<template>
	<view id="companyEditPage">
		<view class="row">
			<text class="label">公司名称</text>
			<input class="row-inp" type="text" v-model="addressee" placeholder="请输入"/>
			<image v-show="addressee" class="clear" src="../../static/img/clear.png" mode="aspectFill" @click="clearVal('addressee')"></image>
		</view>
		<view class="row">
			<text class="label">纳税识别号</text>
			<input class="row-inp" type="tel" v-model="tax" placeholder="请输入"/>
			<image v-show="tax" class="clear" src="../../static/img/clear.png" mode="aspectFill" @click="clearVal('tax')"></image>
		</view>
		<view class="row">
			<text class="label">详细地址</text>
			<input class="row-inp" type="text" v-model="address" placeholder="请输入"/>
		</view>
		<view class="row">
			<text class="label">公司电话</text>
			<input class="row-inp" type="tel" v-model="tel" placeholder="请输入"/>
			<image v-show="tel" class="clear" src="../../static/img/clear.png" mode="aspectFill" @click="clearVal('tel')"></image>
		</view>
		
		<view class="row">
			<text class="label">开户行</text>
			<input class="row-inp" type="text" v-model="bank" placeholder="请输入"/>
			<image v-show="bank" class="clear" src="../../static/img/clear.png" mode="aspectFill" @click="clearVal('bank')"></image>
		</view>
		<view class="row">
			<text class="label">银行账号</text>
			<input class="row-inp" type="tel" v-model="ac" placeholder="请输入"/>
			<image v-show="ac" class="clear" src="../../static/img/clear.png" mode="aspectFill" @click="clearVal('ac')"></image>
		</view>

		<!-- <view class="row">
			<text class="label">门店地址</text>
			<picker class="row-inp" @change="bindPickerChange" mode="region">
				<view class="uni-input">{{zone}}</view>
			</picker>
			<image class="nav-arrow" src="../../static/img/nav-arrow.png" mode="aspectFill"></image>
		</view> -->
		
		<view class="foooter-next" @click="toPrev">
			保存
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				addressee: '',
				tel: '',
				zone: '江苏省南京市玄武区',
				address: '',
				tax: '',
				bank: '',
				ac: '',
				index: []
			}
		},
		methods: {
			bindPickerChange: function(e) {
				console.log('picker发送选择改变，携带值为', e.target.value)
				this.index = e.target.value
				this.zone = e.target.value.join('')
			},
			clearVal(key) {
				this[key] = ''
			},

			
			toPrev() {
				uni.navigateBack({
					delta: -1
				});
			}
		}
	}
</script>

<style>
#companyEditPage {
	padding-left: 34upx;
	
}
.row {
	height: 105upx;
	border-bottom: 1upx solid #eee;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size:28upx;
	font-weight:500;
	color:rgba(34,34,34,1);
	padding-right: 47upx;
	position: relative;
}
.clear {
	width: 26upx;
	height: 26upx;
	position: absolute;
	top: 38upx;
	right: 62upx;
	z-index: 2;
}
.label {
	width: 200upx;
}
.nav-arrow {
	width: 16upx;
	height: 29upx;
}
</style>
